﻿<ResourceDictionary
	xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation" 
	xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml" xmlns:ProgressBarTest="clr-namespace:ProgressBarTest">
	<!-- Resource dictionary entries should be defined here. -->
	<!-- Resource dictionary entries should be defined here. -->
	<Style x:Key="PentagonProgressBarStyle"
		TargetType="{x:Type ProgressBarTest:CircularProgressBar}">
		<Setter Property="Template">
			<Setter.Value>
				<ControlTemplate TargetType="{x:Type ProgressBarTest:CircularProgressBar}">
					<Grid SnapsToDevicePixels="true"
						DataContext="{Binding RelativeSource={RelativeSource FindAncestor, AncestorType={x:Type ProgressBarTest:CircularProgressBar}}}">
						<Path>
							<Path.Fill>
								<RadialGradientBrush>
									<GradientStop Color="#FFBABABA" Offset=".87"/>
									<GradientStop Color="#FFC7C7C7" Offset="0.94"/>
									<GradientStop Color="#FFBABABA" Offset="1"/>
								</RadialGradientBrush>
							</Path.Fill>
							<Path.Data>
								<PathGeometry>
									<PathFigure StartPoint="75,0">
										<LineSegment Point="146.3,51.8" />
										<LineSegment Point="119.1,135.7" />
										<LineSegment Point="30.9,135.7" />
										<LineSegment Point="3.7, 51.8" />
									</PathFigure>
								</PathGeometry>
							</Path.Data>
							<Path.Clip>
								<CombinedGeometry GeometryCombineMode="Exclude">
									<CombinedGeometry.Geometry1>
										<PathGeometry>
											<PathFigure StartPoint="75,0">
												<LineSegment Point="146.3,51.8" />
												<LineSegment Point="119.1,135.7" />
												<LineSegment Point="30.9,135.7" />
												<LineSegment Point="3.7, 51.8" />
											</PathFigure>
										</PathGeometry>
									</CombinedGeometry.Geometry1>
									<CombinedGeometry.Geometry2>
										<PathGeometry>
											<PathFigure StartPoint="75,10">
												<LineSegment Point="136.8,54.9" />
												<LineSegment Point="113.2,127.6" />
												<LineSegment Point="36.8,127.6" />
												<LineSegment Point="13.2, 54.9" />
											</PathFigure>
										</PathGeometry>
									</CombinedGeometry.Geometry2>
								</CombinedGeometry>
							</Path.Clip>
						</Path>
						<Path Fill="#FF01D328">
							<Path.Data>
								<PathGeometry>
									<PathFigure StartPoint="75,0">
										<LineSegment Point="146.3,51.8" />
										<LineSegment Point="119.1,135.7" />
										<LineSegment Point="30.9,135.7" />
										<LineSegment Point="3.7, 51.8" />
									</PathFigure>
								</PathGeometry>
							</Path.Data>
							<Path.Clip>
								<CombinedGeometry GeometryCombineMode="Exclude">
									<CombinedGeometry.Geometry1>
										<PathGeometry>
											<PathFigure StartPoint="0,0">
												<LineSegment Point="0,75" />
												<LineSegment Point="75,75" />
												<LineSegment Point="{Binding ProgressPoint}" />
												<LineSegment Point="{Binding ThirdBoundingPoint}" />
												<LineSegment Point="{Binding SecondBoundingPoint}" />
												<LineSegment Point="{Binding FirstBoundingPoint}" />
											</PathFigure>
										</PathGeometry>
									</CombinedGeometry.Geometry1>
									<CombinedGeometry.Geometry2>
										<PathGeometry>
											<PathFigure StartPoint="75,10">
												<LineSegment Point="136.8,54.9" />
												<LineSegment Point="113.2,127.6" />
												<LineSegment Point="36.8,127.6" />
												<LineSegment Point="13.2, 54.9" />
											</PathFigure>
										</PathGeometry>
									</CombinedGeometry.Geometry2>
								</CombinedGeometry>
							</Path.Clip>
						</Path>
						<Path Fill="#66FFFFFF">
							<Path.Data>
								<PathGeometry>
									<PathFigure StartPoint="75,0">
										<LineSegment Point="146.3,51.8" />
										<LineSegment Point="119.1,135.7" />
										<LineSegment Point="30.9,135.7" />
										<LineSegment Point="3.7, 51.8" />
									</PathFigure>
								</PathGeometry>
							</Path.Data>
							<Path.Clip>
								<CombinedGeometry GeometryCombineMode="Exclude">
									<CombinedGeometry.Geometry1>
										<PathGeometry>
											<PathFigure StartPoint="75,0">
												<LineSegment Point="146.3,51.8" />
												<LineSegment Point="119.1,135.7" />
												<LineSegment Point="30.9,135.7" />
												<LineSegment Point="3.7, 51.8" />
											</PathFigure>
										</PathGeometry>
									</CombinedGeometry.Geometry1>
									<CombinedGeometry.Geometry2>
										<PathGeometry>
											<PathFigure StartPoint="75,5">
												<LineSegment Point="141.6,53.4" />
												<LineSegment Point="116.1,131.6" />
												<LineSegment Point="33.9,131.6" />
												<LineSegment Point="8.4, 53.4" />
											</PathFigure>
										</PathGeometry>
									</CombinedGeometry.Geometry2>
								</CombinedGeometry>
							</Path.Clip>
						</Path>
					</Grid>
					<ControlTemplate.Triggers>
						<Trigger Property="IsIndeterminate"
							Value="true" />
						<Trigger Property="IsIndeterminate"
							Value="false" />
					</ControlTemplate.Triggers>
				</ControlTemplate>
			</Setter.Value>
		</Setter>
	</Style>
</ResourceDictionary>